<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>Map Queries</title>
<link rel="stylesheet" href="doc.css" type="text/css" />
</head>
<body>
<div class="document">
<div class="navigation navigation-header container">
<span class="previous">Previous: <a class="reference" href="controlling_map_scrolling.html" title="Controlling Map Scrolling">Controlling Map Scrolling</a></span><span class="next">Next: <a class="reference" href="rectangular_maps.html" title="Rectangular Maps">Rectangular Maps</a></span><span class="breadcrumbs"><a class="reference" href="index.html" title="Programming Guide">Programming Guide</a> » <a class="reference" href="tiled_maps.html" title="Tiled maps">Tiled maps</a> » Map Queries</span></div>
<h1 class="title">Map Queries</h1>

<p>Maps have a <tt class="docutils literal"><span class="pre">map.get_at_pixel(x,</span> <span class="pre">y)</span></tt> query which will return the Cell at that
position in the Map.</p>
<p>Given a Cell object you may also as <tt class="docutils literal"><span class="pre">map.get_neighbor(cell,</span> <span class="pre">direction)</span></tt> to get
the Cell which is in the direction (one of <tt class="docutils literal"><span class="pre">map.UP</span></tt>, <tt class="docutils literal"><span class="pre">map.DOWN</span></tt>,
<tt class="docutils literal"><span class="pre">map.LEFT</span></tt> or <tt class="docutils literal"><span class="pre">map.RIGHT</span></tt>.)</p>
<div class="navigation navigation-footer container">
<span class="previous">Previous: <a class="reference" href="controlling_map_scrolling.html" title="Controlling Map Scrolling">Controlling Map Scrolling</a></span><span class="next">Next: <a class="reference" href="rectangular_maps.html" title="Rectangular Maps">Rectangular Maps</a></span><span class="breadcrumbs"><a class="reference" href="index.html" title="Programming Guide">Programming Guide</a> » <a class="reference" href="tiled_maps.html" title="Tiled maps">Tiled maps</a> » Map Queries</span></div>
</div>
</body>
</html>
